<!DOCTYPE html>
<html>
<head>
	<meta charset="utf-8">

	<title>KSYMediaHelper Class Reference</title>

	<link rel="stylesheet" href="../css/style.css">
	<meta name="viewport" content="initial-scale=1, maximum-scale=1.4">
	<meta name="generator" content="appledoc 2.2.1 (build 1334)">
</head>
<body class="appledoc">
	<header>
		<div class="container" class="hide-in-xcode">
			
			<h1 id="library-title">
				<a href="../index.html">KSYMediaEditorKit </a>
			</h1>

			<p id="developer-home">
				<a href="../index.html">Kingsoft</a>
			</p>
			
		</div>
	</header>

	<aside>
		<div class="container">
			<nav>
				<ul id="header-buttons" role="toolbar">
					<li><a href="../index.html">Index</a></li>
<li><a href="../hierarchy.html">Hierarchy</a></li>

					<li id="on-this-page" role="navigation">
						<label>
							On This Page

							<div class="chevron">
								<div class="chevy chevron-left"></div>
								<div class="chevy chevron-right"></div>
							</div>

							<select id="jump-to">
	<option value="top">Jump To&#133;</option>
	

	
	
	<option value="tasks">Tasks</option>
	
	

	
	

	
	<optgroup label="Class Methods">
		
		<option value="//api/name/audioMetaFrom:">+ audioMetaFrom:</option>
		
		<option value="//api/name/getImgFromPixelBuffer:">+ getImgFromPixelBuffer:</option>
		
		<option value="//api/name/getVideoAngleWithTransform:">+ getVideoAngleWithTransform:</option>
		
		<option value="//api/name/thumbnailForVideo:atTime:attr:actualTime:error:">+ thumbnailForVideo:atTime:attr:actualTime:error:</option>
		
		<option value="//api/name/thumbnailForVideo:atTimes:attr:completionHandler:">+ thumbnailForVideo:atTimes:attr:completionHandler:</option>
		
		<option value="//api/name/videoMetaFrom:">+ videoMetaFrom:</option>
		
	</optgroup>
	

	
	
</select>
						</label>
					</li>
				</ul>
			</nav>
		</div>
	</aside>

	<article>
		<div id="overview_contents" class="container">
			<div id="content">
				<main role="main">
					<h1 class="title">KSYMediaHelper Class Reference</h1>

					
					<div class="section section-specification"><table cellspacing="0"><tbody>
						<tr>
	<th>Inherits from</th>
	<td>NSObject</td>
</tr><tr>
	<th>Declared in</th>
	<td>KSYMediaHelper.h</td>
</tr>
						</tbody></table></div>
					

                    

					
					
					<div class="section section-tasks">
						<a title="Tasks" name="tasks"></a>
						

						
						

						<div class="task-list">
							<div class="section-method">
	<a name="//api/name/videoMetaFrom:" title="videoMetaFrom:"></a>
	<h3 class="method-title"><code><a href="#//api/name/videoMetaFrom:">+&nbsp;videoMetaFrom:</a></code>
</h3>

	<div class="method-info">
		<div class="pointy-thing"></div>

		<div class="method-info-container">
			
			
			<div class="method-subsection brief-description">
				<p>获取本地视频信息</p>
			</div>
			
		    

			<div class="method-subsection method-declaration"><code>+ (MediaMetaInfo *)videoMetaFrom:(NSURL *)<em>path</em></code></div>

		    
			
			<div class="method-subsection arguments-section parameters">
				<h4 class="method-subtitle parameter-title">Parameters</h4>
				<table class="argument-def parameter-def">
				
					<tr>
						<th scope="row" class="argument-name"><code>path</code></th>
						<td><p>本地视频地址</p></td>
					</tr>
				
				</table>
			</div>
			

			
			<div class="method-subsection return">
				<h4 class="method-subtitle parameter-title">Return Value</h4>
				<p>视频信息</p>
			</div>
			

			

			

			

			

			
			<div class="method-subsection declared-in-section">
				<h4 class="method-subtitle">Declared In</h4>
				<p><code class="declared-in-ref">KSYMediaHelper.h</code></p>
			</div>
			
			
		</div>
	</div>
</div><div class="section-method">
	<a name="//api/name/audioMetaFrom:" title="audioMetaFrom:"></a>
	<h3 class="method-title"><code><a href="#//api/name/audioMetaFrom:">+&nbsp;audioMetaFrom:</a></code>
</h3>

	<div class="method-info">
		<div class="pointy-thing"></div>

		<div class="method-info-container">
			
			
			<div class="method-subsection brief-description">
				<p>获取本地音频信息</p>
			</div>
			
		    

			<div class="method-subsection method-declaration"><code>+ (MediaMetaInfo *)audioMetaFrom:(NSURL *)<em>url</em></code></div>

		    
			
			<div class="method-subsection arguments-section parameters">
				<h4 class="method-subtitle parameter-title">Parameters</h4>
				<table class="argument-def parameter-def">
				
					<tr>
						<th scope="row" class="argument-name"><code>url</code></th>
						<td><p>本地音频文件路径</p></td>
					</tr>
				
				</table>
			</div>
			

			
			<div class="method-subsection return">
				<h4 class="method-subtitle parameter-title">Return Value</h4>
				<p>音频文件信息</p>
			</div>
			

			

			

			

			

			
			<div class="method-subsection declared-in-section">
				<h4 class="method-subtitle">Declared In</h4>
				<p><code class="declared-in-ref">KSYMediaHelper.h</code></p>
			</div>
			
			
		</div>
	</div>
</div><div class="section-method">
	<a name="//api/name/getVideoAngleWithTransform:" title="getVideoAngleWithTransform:"></a>
	<h3 class="method-title"><code><a href="#//api/name/getVideoAngleWithTransform:">+&nbsp;getVideoAngleWithTransform:</a></code>
</h3>

	<div class="method-info">
		<div class="pointy-thing"></div>

		<div class="method-info-container">
			
			
			<div class="method-subsection brief-description">
				<p>通过transform 获取视频rotate信息</p>
			</div>
			
		    

			<div class="method-subsection method-declaration"><code>+ (NSInteger)getVideoAngleWithTransform:(CGAffineTransform)<em>transform</em></code></div>

		    
			

			

			

			

			

			

			
			<div class="method-subsection declared-in-section">
				<h4 class="method-subtitle">Declared In</h4>
				<p><code class="declared-in-ref">KSYMediaHelper.h</code></p>
			</div>
			
			
		</div>
	</div>
</div><div class="section-method">
	<a name="//api/name/getImgFromPixelBuffer:" title="getImgFromPixelBuffer:"></a>
	<h3 class="method-title"><code><a href="#//api/name/getImgFromPixelBuffer:">+&nbsp;getImgFromPixelBuffer:</a></code>
</h3>

	<div class="method-info">
		<div class="pointy-thing"></div>

		<div class="method-info-container">
			
			
			<div class="method-subsection brief-description">
				<p>从 CVPixelBufferRef 中获取图片</p>
			</div>
			
		    

			<div class="method-subsection method-declaration"><code>+ (UIImage *)getImgFromPixelBuffer:(CVPixelBufferRef)<em>videoBuffer</em></code></div>

		    
			
			<div class="method-subsection arguments-section parameters">
				<h4 class="method-subtitle parameter-title">Parameters</h4>
				<table class="argument-def parameter-def">
				
					<tr>
						<th scope="row" class="argument-name"><code>videoBuffer</code></th>
						<td><p>pixel buffer</p></td>
					</tr>
				
				</table>
			</div>
			

			
			<div class="method-subsection return">
				<h4 class="method-subtitle parameter-title">Return Value</h4>
				<p>image</p>
			</div>
			

			

			

			

			

			
			<div class="method-subsection declared-in-section">
				<h4 class="method-subtitle">Declared In</h4>
				<p><code class="declared-in-ref">KSYMediaHelper.h</code></p>
			</div>
			
			
		</div>
	</div>
</div><div class="section-method">
	<a name="//api/name/thumbnailForVideo:atTime:attr:actualTime:error:" title="thumbnailForVideo:atTime:attr:actualTime:error:"></a>
	<h3 class="method-title"><code><a href="#//api/name/thumbnailForVideo:atTime:attr:actualTime:error:">+&nbsp;thumbnailForVideo:atTime:attr:actualTime:error:</a></code>
</h3>

	<div class="method-info">
		<div class="pointy-thing"></div>

		<div class="method-info-container">
			
			
			<div class="method-subsection brief-description">
				<p>同步截图接口</p>
			</div>
			
		    

			<div class="method-subsection method-declaration"><code>+ (CGImageRef)thumbnailForVideo:(NSURL *)<em>path</em> atTime:(CMTime)<em>atTime</em> attr:(NSDictionary *)<em>attr</em> actualTime:(CMTime *)<em>actualTime</em> error:(NSError **)<em>outError</em></code></div>

		    
			
			<div class="method-subsection arguments-section parameters">
				<h4 class="method-subtitle parameter-title">Parameters</h4>
				<table class="argument-def parameter-def">
				
					<tr>
						<th scope="row" class="argument-name"><code>path</code></th>
						<td><p>要截取的视频路径</p></td>
					</tr>
				
					<tr>
						<th scope="row" class="argument-name"><code>atTime</code></th>
						<td><p>截取时间点</p></td>
					</tr>
				
					<tr>
						<th scope="row" class="argument-name"><code>attr</code></th>
						<td><p>截图属性，暂时支持的属性是指定缩略图的高，内部会依据视频尺寸作等比例scale，指定的高必须要小于视频的高</p></td>
					</tr>
				
					<tr>
						<th scope="row" class="argument-name"><code>actualTime</code></th>
						<td><p>真实的截取时间点</p></td>
					</tr>
				
					<tr>
						<th scope="row" class="argument-name"><code>outError</code></th>
						<td><p>错误信息</p></td>
					</tr>
				
				</table>
			</div>
			

			
			<div class="method-subsection return">
				<h4 class="method-subtitle parameter-title">Return Value</h4>
				<p>截取到的图像</p>
			</div>
			

			

			

			

			

			
			<div class="method-subsection declared-in-section">
				<h4 class="method-subtitle">Declared In</h4>
				<p><code class="declared-in-ref">KSYMediaHelper.h</code></p>
			</div>
			
			
		</div>
	</div>
</div><div class="section-method">
	<a name="//api/name/thumbnailForVideo:atTimes:attr:completionHandler:" title="thumbnailForVideo:atTimes:attr:completionHandler:"></a>
	<h3 class="method-title"><code><a href="#//api/name/thumbnailForVideo:atTimes:attr:completionHandler:">+&nbsp;thumbnailForVideo:atTimes:attr:completionHandler:</a></code>
</h3>

	<div class="method-info">
		<div class="pointy-thing"></div>

		<div class="method-info-container">
			
			
			<div class="method-subsection brief-description">
				<p>异步截图接口</p>
			</div>
			
		    

			<div class="method-subsection method-declaration"><code>+ (void)thumbnailForVideo:(NSURL *)<em>path</em> atTimes:(NSArray&lt;NSValue*&gt; *)<em>atTimes</em> attr:(NSDictionary *)<em>attr</em> completionHandler:(KSYThumbnailGenHandler)<em>handler</em></code></div>

		    
			
			<div class="method-subsection arguments-section parameters">
				<h4 class="method-subtitle parameter-title">Parameters</h4>
				<table class="argument-def parameter-def">
				
					<tr>
						<th scope="row" class="argument-name"><code>path</code></th>
						<td><p>视频路径,用户需保证视频存在</p></td>
					</tr>
				
					<tr>
						<th scope="row" class="argument-name"><code>atTimes</code></th>
						<td><p>请求截图的数组，比如
    NSArray *times = @[[NSValue valueWithCMTime:kCMTimeZero], [NSValue valueWithCMTime:CMTimeXX]]</p></td>
					</tr>
				
					<tr>
						<th scope="row" class="argument-name"><code>attr</code></th>
						<td><p>截图属性，比如指定截图的高
    暂时支持的属性是指定缩略图的高，内部会依据视频尺寸作等比例scale，指定的高必须要小于视频的高，参考KSYDefines.h</p></td>
					</tr>
				
					<tr>
						<th scope="row" class="argument-name"><code>handler</code></th>
						<td><p>截图异步回调函数</p></td>
					</tr>
				
				</table>
			</div>
			

			

			

			

			

			

			
			<div class="method-subsection declared-in-section">
				<h4 class="method-subtitle">Declared In</h4>
				<p><code class="declared-in-ref">KSYMediaHelper.h</code></p>
			</div>
			
			
		</div>
	</div>
</div>
						</div>
						
					</div>
					
					

                    
                    
          
				</main>

				<footer>
					<div class="footer-copyright">
						
						<p class="copyright">Copyright &copy; 2018 Kingsoft. All rights reserved. Updated: 2018-02-09</p>
						
						
						<p class="generator">Generated by <a href="http://appledoc.gentlebytes.com">appledoc 2.2.1 (build 1334)</a>.</p>
						
					</div>
				</footer>
			</div>
		</div>
	</article>

	<script src="../js/script.js"></script>
</body>
</html>